﻿using System;

namespace SilenthinkCommon.Components
{
    public struct KeyValue<TKey, TValue>
    {
        public TKey Key;
        public TValue Value;

        public KeyValue(TKey key, TValue value)
        {
            Key = key;
            Value = value;
        }

        public KeyValue(TKey key, Func<TValue> valueFunction)
        {
            Key = key;
            Value = valueFunction();
        }

        public KeyValue(Func<TKey> keyFunction, TValue value)
        {
            Key = keyFunction();
            Value = value;
        }

        public KeyValue(Func<TKey> keyFunction, Func<TValue> valueFunction)
        {
            Key = keyFunction();
            Value = valueFunction();
        }
    }
}